import QtQuick 2.12
import QtQuick.Controls 2.5
import QtQuick.Controls.Material 2.12


Rectangle{
    // property alias gb_width: groupbox.width;
    // property alias gb_height: groupbox.height;
    property alias title : title.text;

    color: "transparent";

    Rectangle{
        border.color: "red"
        border.width: 2
        anchors.topMargin: 10
        anchors.fill:  parent
        radius: 10//圆角

        color: "#252528";
    }

    Rectangle{
        id: titleBackground
        width: title.width
        height: title.height
        anchors.top:parent.top
        implicitHeight:title.height
        //anchors.left: parent.left

        color: "#252528";

        x:20
        opacity:1
        Text{
            id: title
            text: "title"
            font.pixelSize: 20
            color:"green"
        }
    }

    GroupBox {
        id: groupbox
        anchors.top: titleBackground.bottom
        anchors.bottom: parent.bottom
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.margins: 10
    }

}


